package com.beverages.messages.client;

import com.beverages.messages.common.Result;
import com.beverages.messages.config.FeignOkHttpConfig;
import com.beverages.messages.entity.intermediate.CancelOrderReply;
import com.beverages.messages.entity.intermediate.RefundReply;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "merchant-messages-service", url = "${merchant.messages.service.url}", configuration = FeignOkHttpConfig.class)
public interface MerchantMessagesClient {

    @GetMapping("/merchant/messages/reply-for-refund/id/{replyId}")
    Result<RefundReply> getRefundReplyById(@PathVariable("replyId") Integer replyId);

    @GetMapping("/merchant/messages/reply-for-cancelling-order/id/{replyId}")
    Result<CancelOrderReply> getCancelOrderReplyById(@PathVariable("replyId") Integer replyId);

}
